namespace NHCodeFirst.Helpers
{
    using System;
    using System.Collections.Generic;

    internal static class NhClrTypeProxy
    {
        private static readonly Dictionary<Type, string> clr2Nh = new Dictionary<Type, string>();

        static NhClrTypeProxy()
        {
            clr2Nh.Add(typeof(string), "String");
            clr2Nh.Add(typeof(short), "Int16");
            clr2Nh.Add(typeof(int), "Int32");
            clr2Nh.Add(typeof(long), "Int64");
            clr2Nh.Add(typeof(bool), "Boolean");
            clr2Nh.Add(typeof(DateTime), "DateTime");
            clr2Nh.Add(typeof(byte), "Byte");
            clr2Nh.Add(typeof(byte[]), "Binary");
            clr2Nh.Add(typeof(char), "Char");
            clr2Nh.Add(typeof(decimal), "Decimal");
            clr2Nh.Add(typeof(double), "Double");
            clr2Nh.Add(typeof(Guid), "Guid");
            clr2Nh.Add(typeof(float), "Single");
        }


        public static string Clr2Nh(Type type)
        {
            return clr2Nh[type];
        }
    }
}